<?php
namespace app\index\controller;
//use think\Controller;//引入这个命名空间下的类
use app\index\controller\Base;

class Cate extends Base
{
    public function index()
    {
    	$cateid = input('cateid');
    	//查找当前栏目的名称
    	$cates = db('cate')->find($cateid);
    	$this->assign('cates',$cates);
    	//查找当前栏目下的文章
    	$articleres = db('article')->where(array('cateid'=>$cateid))->order('id desc')->paginate(3);
    	$this->assign('articleres',$articleres);
        return $this->fetch('cate');
    }
}